using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._MaritimeTools._S._57._Validation
{
    /// <summary>
    /// <para>Validate S-57 File</para>
    /// <para>Validates an ENC or IENC file and generates an .S58 file as a result.</para>
    /// <para>验证 ENC 或 IENC 文件并生成 .结果 S58 文件。</para>
    /// </summary>    
    [DisplayName("Validate S-57 File")]
    public class ValidateS57File : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ValidateS57File()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_s57_file">
        /// <para>Input S-57 File</para>
        /// <para>The base cell file (*.000).</para>
        /// <para>基本单元格文件 （*.000）。</para>
        /// </param>
        /// <param name="_out_directory">
        /// <para>Output Directory</para>
        /// <para>The location where the validated S-57 log will be created.</para>
        /// <para>将创建已验证的 S-57 日志的位置。</para>
        /// </param>
        public ValidateS57File(object _in_s57_file, object _out_directory)
        {
            this._in_s57_file = _in_s57_file;
            this._out_directory = _out_directory;
        }
        public override string ToolboxName => "Maritime Tools";

        public override string ToolName => "Validate S-57 File";

        public override string CallName => "maritime.ValidateS57File";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_s57_file, _out_directory, _in_update_cells, _regional_rules.GetGPValue(), _in_ignore_list, _out_log_file];

        /// <summary>
        /// <para>Input S-57 File</para>
        /// <para>The base cell file (*.000).</para>
        /// <para>基本单元格文件 （*.000）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input S-57 File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_s57_file { get; set; }


        /// <summary>
        /// <para>Output Directory</para>
        /// <para>The location where the validated S-57 log will be created.</para>
        /// <para>将创建已验证的 S-57 日志的位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Directory")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_directory { get; set; }


        /// <summary>
        /// <para>Update Cells</para>
        /// <para>The update cell files (*.001 - *.999).</para>
        /// <para>更新单元文件 （*.001 - *.999）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Cells")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _in_update_cells { get; set; } = null;


        /// <summary>
        /// <para>Regional Rules</para>
        /// <para><xdoc>
        ///   <para>For IENC cells, some validation rules don't apply in certain regions, or they check for different objects and attribution. The selected region will honor the rules set forth in the Recommended Inland ENC Validation Checks for that region.</para>
        ///   <bulletList>
        ///     <bullet_item>Brazil—Brazilian validation rules apply.</bullet_item><para/>
        ///     <bullet_item>Europe—European validation rules apply.</bullet_item><para/>
        ///     <bullet_item>Russian Federation—Russian Federation validation rules apply.</bullet_item><para/>
        ///     <bullet_item>United States—United States validation rules apply.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>对于 IENC 单元，某些验证规则不适用于某些区域，或者它们会检查不同的对象和属性。所选地区将遵守该地区推荐的内陆 ENC 验证检查中规定的规则。</para>
        ///   <bulletList>
        ///     <bullet_item>巴西 - 巴西验证规则适用。</bullet_item><para/>
        ///     <bullet_item>欧洲 - 欧洲验证规则适用。</bullet_item><para/>
        ///     <bullet_item>俄罗斯联邦 - 适用俄罗斯联邦验证规则。</bullet_item><para/>
        ///     <bullet_item>美国 - 适用美国验证规则。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Regional Rules")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _regional_rules_value? _regional_rules { get; set; } = null;

        public enum _regional_rules_value
        {
            /// <summary>
            /// <para>Brazil</para>
            /// <para>Brazil—Brazilian validation rules apply.</para>
            /// <para>巴西 - 巴西验证规则适用。</para>
            /// </summary>
            [Description("Brazil")]
            [GPEnumValue("BR")]
            _BR,

            /// <summary>
            /// <para>Europe</para>
            /// <para>Europe—European validation rules apply.</para>
            /// <para>欧洲 - 欧洲验证规则适用。</para>
            /// </summary>
            [Description("Europe")]
            [GPEnumValue("EU")]
            _EU,

            /// <summary>
            /// <para>Russian Federation</para>
            /// <para>Russian Federation—Russian Federation validation rules apply.</para>
            /// <para>俄罗斯联邦 - 适用俄罗斯联邦验证规则。</para>
            /// </summary>
            [Description("Russian Federation")]
            [GPEnumValue("RU")]
            _RU,

            /// <summary>
            /// <para>United States</para>
            /// <para>United States—United States validation rules apply.</para>
            /// <para>美国 - 适用美国验证规则。</para>
            /// </summary>
            [Description("United States")]
            [GPEnumValue("US")]
            _US,

        }

        /// <summary>
        /// <para>Ignore List</para>
        /// <para>A text file containing a list of checks to ignore in the output log file.</para>
        /// <para>一个文本文件，其中包含要在输出日志文件中忽略的检查列表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Ignore List")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_ignore_list { get; set; } = null;


        /// <summary>
        /// <para>Output S-58 Log File</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output S-58 Log File")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_log_file { get; set; }


        public ValidateS57File SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}